Skip to content

Conversation

@fredrikekelund
Copy link
Contributor

Related issues

Proposed Changes

This PR is based on @youknowriad's work in #1958. It implements a studio auth status command that:

  1. Checks for a valid auth token in appdata (and make an API request to confirm its validity)
  2. Prints a message to let the user know if they're authenticated, and, if so, what their username is

Testing Instructions

  1. Run npm run cli:build
  2. Run node dist/cli/main.js auth logout
  3. Run node dist/cli/main.js auth status
  4. Ensure a "Authentication token is invalid or expired" message is printed
  5. Open Studio
  6. Log in to WordPress.com
  7. Run node dist/cli/main.js auth status
  8. Ensure a "Successfully authenticated with WordPress.com as `USERNAME`" message is printed

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@fredrikekelund fredrikekelund requested review from a team and bcotrim November 6, 2025 12:36
@fredrikekelund fredrikekelund self-assigned this Nov 6, 2025
@github-actions
Copy link

github-actions bot commented Nov 6, 2025

📊 Performance Test Results

Comparing 58bae50 vs trunk

site-editor

Metric trunk 58bae50 Diff Change
load 7859.00 ms 6824.00 ms -1035.00 ms 🟢 -13.2%

site-startup

Metric trunk 58bae50 Diff Change
siteCreation 17172.00 ms 16116.00 ms -1056.00 ms 🟢 -6.1%
siteStartup 6012.00 ms 6002.00 ms -10.00 ms 🟢 -0.2%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change

} catch ( error ) {
throw new LoggerError( __( 'Failed to revoke token' ), error );
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot of things in this file that should be "common" between CLI and App.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants